//
//  SNUpdateClass.h
//  project
//
//  Created by 黄建华 on 2017/12/30.
//  Copyright © 2017年 黄建华. All rights reserved.
//

#import <Foundation/Foundation.h>
#define SN_Net           ([SNUpdateClass sharedInstance])
#define LASTUPDATESTEP @"LASTUPDATESTEP"
#define LASTUPDATESLEEP @"LASTUPDATESLEEP"
#define LASTUPDATEHEART @"LASTUPDATEHEART"
#define LASTUPDATEBP @"LASTUPDATEBP"
#define LASTUPDATEOX @"LASTUPDATEOX"
typedef enum {
    HJUpdateStep  = 0,
    HJUpdateSleep = 1,
    HJUpdateHeart = 2,
    HJUpdateOX    = 3,
    HJUpdateBp    = 4,
    HJUpdateMap   = 5,
} HJUpdateModelUpdateState;

@interface SNUpdateClass : NSObject
@property(nonatomic, assign) NSInteger save;
AS_SINGLETON(SNUpdateClass)

// 游客登录 //第三方登录接口
- (void)loginOnWithOpenId :(NSString*)openId withOpenType:(NSString *)openType Success:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;

// 获取用户信息 token
- (void)getUserInfoWithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
//上传图片
-(void)uploadImageWithImage:(UIImage *)image WithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
// 上传用户信息
- (void)updateUserInfoWithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
// 登陆
- (void)loginOnWithsuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;

// 注册手机
- (void)RegistratWithPhonesuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;

// 注册邮箱
- (void)RegistratWithEmailsuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
//用户信息反馈
-(void)FeedBackWithContent:(NSString *)content Success:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
- (void)loginFinish:(id)object;

// 上传 数据 运动 睡眠 心率 血氧 血压
- (void)updateEveryModelWithType:(HJUpdateModelUpdateState)type;

// 根据类型上传数据
- (void)uploadDataToServer:(HJUpdateModelUpdateState)link dict:(NSDictionary *)dict
                   success:(NSObjectSimpleBlock)success
                      fail:(NSObjectSimpleBlock)fail;
//上传跑道数据
- (void)uploadDataToServer:(NSString *)link dict:(NSDictionary *)dict image:(UIImage *)image imageName:(NSString *)imageName
                   success:(NSObjectSimpleBlock)success
                      fail:(NSObjectSimpleBlock)fail;
//获取跑道数据
-(void)getTrackDataWithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
// 获取设备在线信息
- (void)getDeviceSFromServerWithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
// 获取设备升级信息
- (void)getDeviceUpdateInfoFromServerWithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
//同步数据
- (void)updateDataWithType:(HJUpdateModelUpdateState)type;
//获取所有APP版本状态
-(void)getAppUpdateInfoFromServerWithSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;

//上传用户手环信息
- (void)updateBleDeviceSuccess:(NSObjectSimpleBlock)success fail:(NSObjectSimpleBlock)fail;
//发送用户日志
-(void)uploadUserLog;
-(void)feedBackUserLog;
/***********************************下载数据***********************************/

@end

